home *** CD-ROM | disk | FTP | other *** search
/ Aminet 34 / Aminet 34 (2000)(Schatztruhe)[!][Dec 1999].iso / Aminet / comm / irc / cybershiela.lha / cs / csc_ping.amirx < prev    next >
Text File  |  1999-07-10  |  1KB  |  67 lines

  1. /* shiela ping responder */
  2. Options Results  
  3. signal on syntax 
  4. ponger=getclip('PONGER')
  5. nick=getclip('NICK')
  6. if ponger=1 then do;'say Ping is in Use atm...Please try again in a moment after i report this poing.';exit;end
  7. call setclip('PONGER','1')
  8. getusers
  9. allusers=result
  10. x=pos(nick,upper(allusers))
  11. if x<1 then signal nouser
  12. call time('R')
  13. 'say /ping 'nick
  14. HuHuhLoopit:
  15. krv=time('E')
  16. if krv>150 then signal timeout
  17. getmynick
  18. mynick=result
  19. 'userhost 'mynick
  20. myhost=result
  21. xxk=pos('@',myhost)
  22. myfront=substr(myhost,1,xxk-1)
  23. drop comm
  24. drop dest
  25. drop text
  26. drop prefix
  27. drop nick
  28. drop rest
  29. getchannel
  30. channam=Upper(result)
  31. 'getline'
  32. text=line 
  33. prefix=line.prefix 
  34. comm=line.command 
  35. dest=line.dest  
  36. rest=line.rest
  37.  
  38. xv=pos('!',prefix,1)
  39. if xv>0 then do;nick=left(prefix,xv-1);end
  40. msgr=nick
  41. if upper(left(comm,4))="NOTI" then signal NOTICE
  42. signal huhuhloopit
  43.  
  44. nouser:
  45. 'say no such user exist'
  46. call setclip('PONGER','0')
  47. exit
  48.  
  49. NOTICE: 
  50. getmynick
  51. mynick=upper(result)
  52. xv=pos('!',prefix,1)
  53. if xv>0 then do;nick=left(prefix,xv-1);end
  54. if upper(nick)=upper(msgr) then signal morenotice
  55. signal huhuhloopit
  56.  
  57. MORENOTICE:
  58. krv=time('E')
  59. 'say Ping For 'nick' is 'krv'sec.'
  60.  
  61. call setclip('PONGER','0')
  62. exit
  63.  
  64. TIMEOUT:
  65. 'say lag on 'nick' was more than 150 seconds aborting'
  66. call setclip('PONGER','0')
  67. exit